all:server public_client consume_client

server:./mqserver/mqbroker.cpp ./mqcommon/message.pb.cc ./mqcommon/protocol.pb.cc ./mqthird/include/muduo/proto/codec.cc
	g++ -g -o $@ $^ -std=c++17 -lz -lprotobuf -lsqlite3 -lgtest -pthread -lmuduo_base -lmuduo_net  -I./mqthird/include -L./mqthird/lib

public_client:./mqclient/public_client.cpp ./mqcommon/message.pb.cc ./mqcommon/protocol.pb.cc ./mqthird/include/muduo/proto/codec.cc
	g++ -g -o $@ $^ -std=c++17 -lz -lprotobuf -lsqlite3 -lgtest -pthread -lmuduo_base -lmuduo_net  -I./mqthird/include -L./mqthird/lib

consume_client:./mqclient/consume_client.cpp ./mqcommon/message.pb.cc ./mqcommon/protocol.pb.cc ./mqthird/include/muduo/proto/codec.cc
	g++ -g -o $@ $^ -std=c++17 -lz -lprotobuf -lsqlite3 -lgtest -pthread -lmuduo_base -lmuduo_net  -I./mqthird/include -L./mqthird/lib

.PHONY:clean server public_client consume_client
clean:
	rm -f server public_client consume_client